package cn.caplike.demo.repository.design.pattern.proxy.cglib.sample;

public class Client {
    public static void main(String[] args) {
        final Producer target = new Producer();
        Producer producerProxy = (Producer) CglibProxy.getProxy(target);
        // 调用相关方法
        producerProxy.eat().work().play();

        System.out.println("proxy: " + target + ", class: " + target.getClass());
        System.out.println("proxyProducer: " + producerProxy + ", class: " + producerProxy.getClass());
    }
}
